// SETUP

#include intrographics.txt
#include ladyluckbiggraphics.txt

setdatapath("data/graphics/cutscenes/witch/");

var witchgraphics = {
	idle: {
		animation: "witch_idle.json",
		pack: "witch.pck",
		loop: true
	},
	worried_idle: {
		animation: "witch_worried_idle.json",
		pack: "witch.pck",
		loop: true
	}
}
var witch = addsprite("witch", 1, witchgraphics);

// HELPER FUNCTIONS	

var fade_time = 0.4;

// ACTORS
actor("Lady Luck", screenwidthmid + 800, 550, Col.YELLOW, CENTER, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
actor("Witch", 2600, 600, 0xb496ec, RIGHT, TOP, "chat_witch", "characters/witch/charicon_witch");

// INTRO

play("music_cutscene_lesscheery");

witch.scale = 0.5;
witch.x = 2700 - ((witch.getwidth("idle") * witch.scale) / 2);
witch.y = 650;
changebackground("intro_stage");
fadein();
witch.show("idle");

ladyluck_big.x = -screenwidth;
ladyluck_big.show("idle");
Actuate.tween(ladyluck_big, 2, { x: 0 }).ease(Expo.easeOut);
play("cutscene_audience");

wait(0.5);

ladyluck_big.show("talking", true);
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 240, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
speak("Lady Luck", "My wonderful Witch! How have you been|enjoying your time in the Dungeons?");
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 280, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
ladyluck_big.show("talking-sly", true);
speak("Lady Luck", "Too easy, perhaps? Maybe I'll crank up the difficulty.");
ladyluck_big.show("idle-sly", true);

actor("Witch", 2680, 730, 0xb496ec, CENTER, BOTTOM, "chat_witch", "characters/witch/charicon_witch");
speak("Witch", "It’s okay. I can do this.");
speak("Witch", "It’ll be fine! It’ll all be fine.");

ladyluck_big.show("talking", true);
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 240, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
speak("Lady Luck", "That's the spirit, my dear!");
ladyluck_big.show("talking-sly", true);
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 280, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
speak("Lady Luck", "That can-do attitude is why you're my favourite.");
ladyluck_big.show("talking", true);
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 240, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
speak("Lady Luck", "Of course, you’re all doomed in the long run...");
ladyluck_big.show("idle", true);

speak("Witch", "It’s.. it’s all about the journey, right?");
speak("Witch", "And I’m just so humbled by the support at home.");
speak("Witch", "I *am* supported at home, right?");
speak("Witch", "The audience likes me?");

ladyluck_big.show("talking-sly", true);
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 280, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
speak("Lady Luck", "Not all of them, my dear.");
speak("Lady Luck", "Honestly, you’re a bit of a divisive figure.");
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 240, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
ladyluck_big.show("talking", true);
speak("Lady Luck", "But maybe you can win them over|now if you try hard enough!");
ladyluck_big.show("idle", true);

startgamefromcutscene();